package single

import (
	"github.com/gin-gonic/gin"
	"github.com/gin-contrib/sessions"
)

var router *gin.Engine

func init() {
	router = gin.Default()
	router.Static("/static", "./static")
	router.LoadHTMLGlob("views/*")
	store := sessions.NewCookieStore([]byte("secret"))
	router.Use(sessions.Sessions("mysession", store))
}

func GetRouter() *gin.Engine {
	return router
}
